package com.swyc.osschat.Test.designMode.intermediary.impl;

import com.swyc.osschat.Test.designMode.intermediary.base.WechatUser;

/**
 * @description 具体同事类
 * @Author: z156940l@outlook.com
 * @className User
 * @Date: 2022/6/28 8:59
 */
public class User extends WechatUser {

    public User(String name) {
        super(name);
    }

    @Override
    public void receive() {
        //中介者调用
        System.out.println(name+"收到了消息");
    }

    @Override
    public void send() {
        System.out.println(name+"发送了消息");
        //通过中介者发送
        mediator.send(this);
    }
}
